cmake_minimum_required(VERSION 3.27.0)

project(SDL_Cube)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)

set(SDL_DIR <SDL2dir>)
set(SDL_LIBRARY ${SDL_DIR}/lib)
set(SDL_INCLUDE_DIR ${SDL_DIR}/include)
find_package(SDL REQUIRED)
include(${SDL_LIBRARY}/cmake/SDL2/sdl2-config.cmake)
include_directories(${SDL_INCLUDE_DIR})
include_directories(${SDL_DIR}/bin)

add_executable(${PROJECT_NAME} main.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC include ${CMAKE_CURRENT_SOURCE_DIR})
target_link_directories(${PROJECT_NAME} PUBLIC ${SDL_LIBRARY})
target_link_libraries(${PROJECT_NAME} mingw32 SDL2)